package JD;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main2 {

    public static void main(String[] args) throws Exception{
        BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
        String s = buf.readLine();
        int n = Integer.parseInt(s);
        s = buf.readLine();
        StringBuilder sb = new StringBuilder();
        ArrayList<List<Integer>> res = new ArrayList<>();
        Deque<Integer> path = new ArrayDeque<>(new ArrayDeque<>());


    }
}
